package com.tourlaid.mamagerment.ao.wx.impl

import com.tourlaid.mamagerment.ao.wx.MyselfAo
import com.tourlaid.mamagerment.service.UserService
import org.springframework.stereotype.Service
import javax.annotation.Resource

/**
 * Created by xiaoyongge on 2017/8/30.
 */
@Service("myselfAo")
class MyselfAoImpl : MyselfAo {

    @Resource
    val userService: UserService? = null

    override fun getMyself(userId: Long): MutableMap<String, Any?> {
        val user = userService!!.getById(userId)
        val map = mutableMapOf(
                "picture" to user.picture,
                "nickName" to user.nickName,
                "isVip" to user.isVip,
                "integral" to user.integral)
        return map
    }
}